package com.xc.hotelmgr.webapi.modules.ht.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xc.hotelmgr.webapi.common.utils.PageUtils;
import com.xc.hotelmgr.webapi.common.utils.Query;

import com.xc.hotelmgr.webapi.modules.ht.dao.HtBrandDao;
import com.xc.hotelmgr.webapi.modules.ht.entity.HtBrandEntity;
import com.xc.hotelmgr.webapi.modules.ht.service.HtBrandService;


@Service("htBrandService")
public class HtBrandServiceImpl extends ServiceImpl<HtBrandDao, HtBrandEntity> implements HtBrandService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Object  bname = params.get("bname");
        IPage<HtBrandEntity> page = this.page(
                new Query<HtBrandEntity>().getPage(params),
                new QueryWrapper<HtBrandEntity>().like(bname!=null,"bname",bname)
        );

        return new PageUtils(page);
    }

}